import D2Ext

from .CObject import CObject
from .Constants import *


class CVBoxLayout(CObject):

    def __init__(self, parent=None):
        super(CVBoxLayout, self).__init__(parent)
        self.text = ""
        self.font = 1
        self.color = D2Color.WHITE

    def add_item(self, layout):
        pass

    def add_widget(self, widget, row=0, align=ALIGN_CENTER):
        pass

    def set_spacing(self, spacing):
        pass

    def set_contents_margins(self, top=0, left=0, bottom=0, right=0):
        pass

    def set_text(self, text):
        self.text = text

    def text(self):
        return self.text

    def set_font(self, font):
        self.font = font

    def font(self):
        return self.font

    def text_width(self):
        return D2Ext.View_GetPixelLen(self.text)

